<!-- 修改密码 -->
<template>
  <div>
    <el-button @click="outerVisible = true">修改密码</el-button>
    <el-dialog v-dialogDrag :fullscreen="isFullScreen" :custom-class="isFullScreen?'fullscreen-default-dialog':'vertical-center-dialog'"
      :before-close="handleClose" :visible.sync="outerVisible" append-to-body :close-on-click-modal="false" width="380px">
      <div slot="title">
        <span style="color:white;">修改密码提示</span>
        <button type="button" aria-label="fullScreen" class="el-dialog__headerbtn" style="margin-right:25px;" @click="isFullScreen = !isFullScreen">
          <i class="el-dialog__close iconfont icon-fuzhicopy22"></i>
        </button>
      </div>
      <el-dialog width="380px" title="提示" :visible.sync="innerVisible" append-to-body>
        修改成功
      </el-dialog>
      <el-form :model="formData" :inline="true" size="small" label-width="100px">
        <el-row>
          <el-col :span="24">
            <el-form-item label="密码">
              <el-input v-model="formData.password"></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="24">
            <el-form-item label="确认密码">
              <el-input v-model="formData.confirmPassword"></el-input>
            </el-form-item>
          </el-col>
        </el-row>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button @click="outerVisible = false">取 消</el-button>
        <el-button type="primary" @click="innerVisible = true">确定</el-button>
      </div>
    </el-dialog>
  </div>
</template>

<script>
  export default {
    data() {
      return {
        isFullScreen: false,
        outerVisible: false,
        innerVisible: false,
        formData: {
          password: '',
          confirmPassword: ''
        }
      };
    },
    methods: {
      handleClose() { /* 关闭的时候更新状态值 */
        this.isFullScreen = false;
        this.dialogVisible = false;
      }
    }
  }

</script>
